package mc.support.task.common;

/**
 * Created with IntelliJ IDEA. <br/>
 * Author: Francis Yun    <br/>
 * Date: 2014-03-27  <br/>
 */
public abstract class CronTaskAdaptor
        extends ControllableAdaptor
        implements CronTask {
    public boolean launchNow = false;

    public boolean needsSchedule = false;

    public String cronPattern = null;

    @Override
    public boolean isLaunchNow() {
        return launchNow;
    }

    @Override
    public boolean needsSchedule() {
        return needsSchedule;
    }

    @Override
    public String getCronPattern() {
        return cronPattern;
    }

    public void setLaunchNow(boolean launchNow) {
        this.launchNow = launchNow;
    }

    public boolean isNeedsSchedule() {
        return needsSchedule;
    }

    public void setNeedsSchedule(boolean needsSchedule) {
        this.needsSchedule = needsSchedule;
    }

    public void setCronPattern(String cronPattern) {
        this.cronPattern = cronPattern;
    }
}
